package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.FintechUserPersonal;
import com.appkubes.mall.core.po.FintechUserPersonalExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface FintechUserPersonalMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserPersonalSqlProvider.class, method="countByExample")
    long countByExample(FintechUserPersonalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @DeleteProvider(type=FintechUserPersonalSqlProvider.class, method="deleteByExample")
    int deleteByExample(FintechUserPersonalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @Delete({
        "delete from fintech_user_personal",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String userKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @Insert({
        "insert into fintech_user_personal (user_key, idcard_front_view, ",
        "idcard_back_view, face_img, ",
        "creator, create_time, ",
        "updater, update_time, ",
        "version)",
        "values (#{userKey,jdbcType=VARCHAR}, #{idcardFrontView,jdbcType=VARCHAR}, ",
        "#{idcardBackView,jdbcType=VARCHAR}, #{faceImg,jdbcType=VARCHAR}, ",
        "#{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updater,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{version,jdbcType=VARCHAR})"
    })
    int insert(FintechUserPersonal record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @InsertProvider(type=FintechUserPersonalSqlProvider.class, method="insertSelective")
    int insertSelective(FintechUserPersonal record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserPersonalSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="idcard_front_view", property="idcardFrontView", jdbcType=JdbcType.VARCHAR),
        @Result(column="idcard_back_view", property="idcardBackView", jdbcType=JdbcType.VARCHAR),
        @Result(column="face_img", property="faceImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR)
    })
    List<FintechUserPersonal> selectByExampleWithRowbounds(FintechUserPersonalExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserPersonalSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="idcard_front_view", property="idcardFrontView", jdbcType=JdbcType.VARCHAR),
        @Result(column="idcard_back_view", property="idcardBackView", jdbcType=JdbcType.VARCHAR),
        @Result(column="face_img", property="faceImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR)
    })
    List<FintechUserPersonal> selectByExample(FintechUserPersonalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "user_key, idcard_front_view, idcard_back_view, face_img, creator, create_time, ",
        "updater, update_time, version",
        "from fintech_user_personal",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="idcard_front_view", property="idcardFrontView", jdbcType=JdbcType.VARCHAR),
        @Result(column="idcard_back_view", property="idcardBackView", jdbcType=JdbcType.VARCHAR),
        @Result(column="face_img", property="faceImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR)
    })
    FintechUserPersonal selectByPrimaryKey(String userKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserPersonalSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FintechUserPersonal record, @Param("example") FintechUserPersonalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserPersonalSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FintechUserPersonal record, @Param("example") FintechUserPersonalExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserPersonalSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FintechUserPersonal record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_personal
     *
     * @mbg.generated
     */
    @Update({
        "update fintech_user_personal",
        "set idcard_front_view = #{idcardFrontView,jdbcType=VARCHAR},",
          "idcard_back_view = #{idcardBackView,jdbcType=VARCHAR},",
          "face_img = #{faceImg,jdbcType=VARCHAR},",
          "creator = #{creator,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "updater = #{updater,jdbcType=VARCHAR},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=VARCHAR}",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(FintechUserPersonal record);
}